function test(){
    let num = 1
    return ()=>{
        console.log(++num)
    }
}
var data = test()
data() //2
data()  //3
data()  //4
data()  //5
// data = null
var data = test()
data() //2
data()  //3
data()  //4
data()  //5


//完全解除闭包
num = null
data = null
var data = test()
data() //2